<?php
include('global.php');
$sql = "SELECT `userid`,`avatar` FROM `renren_hunauhomeurl` WHERE `status` = 1 AND `rank_score` != 0";
$query = $db->query($sql);
$num = $db->num_rows($query);
if($num < 100)$db->jumpAction('index','2',$msg='目前投票情况还不够排行，赶紧投票吧！！！');
$sql = "SELECT `userid`,`avatar` FROM `renren_hunauhomeurl` WHERE `status` = 1 ORDER BY `rank_score` DESC LIMIT 0,100";
$query = $db->query($sql);
while($row = $db->fetch_array($query)){
	$data[] = array('userid'=>$row['userid'],'avatar'=>$row['avatar']);
}

include('templates/rank.html');





?>